package cn.wolfcode.shop.common.util;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

@Setter
@Getter
public class CodeMsg implements Serializable {
    public final static CodeMsg DEFAULT_ERROR = new CodeMsg(500,"服务器正忙，请稍后再试.");
    public final static CodeMsg LOGIN_ERROR = new CodeMsg(500100,"账号不存在.");
    public final static CodeMsg PASSWORD_ERROR = new CodeMsg(500101,"密码错误.");
    public final static CodeMsg USER_NO_LOGIN = new CodeMsg(500201,"请先登录.");
    public final static CodeMsg GOOD_NO_INVENTORY = new CodeMsg(500202,"商品不存在.");
    public final static CodeMsg ACTIVITY_NOT_STARTED = new CodeMsg(500203,"活动未开始.");
    public final static CodeMsg DOUBLE_ORDERING = new CodeMsg(500204,"请勿重复下单.");
    public final static CodeMsg ORDERING_ERROR = new CodeMsg(500205,"订单异常.");
    public final static CodeMsg STOCK_OVER = new CodeMsg(500206,"抢购结束.");
    public final static CodeMsg ORDER_TIME_OUT = new CodeMsg(500207,"订单超时.");
    public static final CodeMsg OP_ERROR = new CodeMsg(500303, "非法请求");
    public static final CodeMsg VERIFYCODE_ERROR = new CodeMsg(500307, "验证码有误");



    private int code;
    private String msg;


    public CodeMsg(int code,String msg){
        this.code = code;
        this.msg = msg;
    }

}